<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <!-- 编写位置一：编写在html内部 -->
  <!-- <!-- <a href="#" onclick="alert(`百度一下`)">百度一下</a> -->
  <a href="javascript:alert(`百度一下`)">百度一下</a> -->
  <!-- 2.编写位置二：编写在script元素之内 -->
  <div></div>
  <a class="google"  href="#">goole一下</a>
  <script>
  // alert("Hellow_World")
  var googleAEI=document.querySelector(".google")
  googleAEI.onclick=function(){
    alert("Google一下")
  }
  </script>
  <!-- 编写位置3，独立的js文件 -->
  <a class="bing" href="#">bing一下</a>
  <script src="./js/bing.js"></script>
</body>

</html>